<template>
    <div class="wrapper">
      我是爷爷，引用father组件
      <father />
      <br>
      <hr>
      我是爷爷，引用了son组件
      <son  @sonHandle='sonHandle' />
  </div>
</template>

<script>
import Father from '@/components/element-ui/ProvideAndInject/Father'
import Son from '@/components/element-ui/ProvideAndInject/Son'
  export default {
    components: {Father,Son},
    props: {},
    data (){
      return {
          value1:'我是爷爷1',
          value2:'我是爷爷2',
      }
    },
    provide(){
      return {
        value1:this.value1,
        value2:this.value2
      }
    },
    created (){},
    mounted (){},
    activated (){},
    updated (){},
    methods: {
       sonHandle(val){
        console.log('爷爷获取儿子的数据',val)
      }
    },
    computed: {},
    watch: {},
  }
</script>
<style scoped lang='scss'>
</style>